#include "manifest.h"

int64 nanotime() {
    struct timespec tm = {0};
#ifdef ANDROID
    clock_gettime(CLOCK_REALTIME_HR, &tm);
#else
    clock_gettime(CLOCK_REALTIME, &tm);
#endif
    return 1000000000LL * tm.tv_sec + tm.tv_nsec;
}

int64 cputime() {
    struct timespec tm = {0};
    clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tm);
    return 1000000000LL * tm.tv_sec + tm.tv_nsec;
}

